package xyz.labradormm.spider.domain.dto;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * @author hhj
 * @description
 * @date 2023-12-06 19:47
 * @menu
 */
@Data
public class DownloadVideoDto {

    private String targetUrl;

    private String qualityLabel;

    private int generateAudioSwitch;


    public static void main(String[] args) {
        Map<String,String> dictMap=new HashMap<>();
        dictMap.put(" ","%20");
        dictMap.put("\"","%22");
        dictMap.put("#","%23");
        dictMap.put("%","%25");
        dictMap.put("&","%26");
        dictMap.put("(","%28");
        dictMap.put(")","%29");
        dictMap.put("+","%2B");
        dictMap.put(",","%2C");
        dictMap.put("/","%2F");
        dictMap.put(":","%3A");
        dictMap.put(";","%3B");
        dictMap.put("<","%3C");
        dictMap.put("=","%3D");
        dictMap.put(">","%3E");
        dictMap.put("?","%3F");
        dictMap.put("@","%40");
        dictMap.put("\\\\","%5C");
        dictMap.put("|","%7C");
        String url="https://rr2---sn-i3bssn7e.googlevideo.com/videoplayback%3Fexpire%3D1702417560%26ei%3DOIB4ZdyTCM-Rs8IP5Mq3iAc%26ip%3D89.185.30.208%26id%3Do-AIgwFSHH7IsT6Ag0_P6rlCDr3mFZurUvyma-i18MB6Nj%26itag%3D18%26source%3Dyoutube%26requiressl%3Dyes%26xpc%3DEgVo2aDSNQ%253D%253D%26mh%3D0t%26mm%3D31%252C29%26mn%3Dsn-i3bssn7e%252Csn-i3b7knsl%26ms%3Dau%252Crdu%26mv%3Dm%26mvi%3D2%26pl%3D24%26initcwndbps%3D2802500%26siu%3D1%26spc%3DUWF9f_MtZBUWC_9ZmBon6oRI38EfEoP0F_y99kZDFUky0bmgA6YSGz8%26vprv%3D1%26svpuc%3D1%26mime%3Dvideo%252Fmp4%26ns%3DqQ5B_Ed77q77qJk0gIkDQqsP%26cnr%3D14%26ratebypass%3Dyes%26dur%3D252.075%26lmt%3D1700996409776009%26mt%3D1702395449%26fvip%3D1%26fexp%3D24007246%26c%3DWEB%26sefc%3D1%26txp%3D6308224%26n%3DtOT6vnNQjdzAPscjN%26sparams%3Dexpire%252Cei%252Cip%252Cid%252Citag%252Csource%252Crequiressl%252Cxpc%252Csiu%252Cspc%252Cvprv%252Csvpuc%252Cmime%252Cns%252Ccnr%252Cratebypass%252Cdur%252Clmt%26lsparams%3Dmh%252Cmm%252Cmn%252Cms%252Cmv%252Cmvi%252Cpl%252Cinitcwndbps%26lsig%3DAM8Gb2swRAIgU-PvObdC6UXoskiO0FL1MskFBM5F2qFOYj84MTgoMo8CICJ5aAlfcN96cbz98Zp0KVet-Zcrwsl0UQ9KIXOvV_Bf";
        for (String key : dictMap.keySet()) {
            url=url.replace(dictMap.get(key),key);
        }
        System.out.println(url);

    }

}
